<?php
$gender = elgg_view ( 'input/dropdown', array (
		'name' => 'gender',
		'options_values' => array (
				'male' => elgg_echo ( 'resume:personal:gender:male' ),
				'female' => elgg_echo ( 'resume:personal:gender:female' ),
				'other' => elgg_echo ( 'resume:personal:gender:other' ) 
		),
		'value' => $vars ['gender'] 
) );
$dob = elgg_view ( 'input/date', array (
		'name' => "dob",
		'value' => $vars ['dob']
));

if (isset ( $vars ['id'] )) {
	$guid = elgg_view('input/hidden', array('name' => 'id', 'value' => $vars['id']));
}
// Constant
$KTPM = 1;
$KHMT = 2;
$MMTTT = 3;
$HTTT = 4;
$user = elgg_get_logged_in_user_entity();
switch ($user->faculty) {
	case $KTPM :
		$vars['faculty'] = elgg_echo('uit:faculty:se');
		break;
	case $KHMT :
		$vars['faculty'] = elgg_echo('uit:faculty:cs');
		break;
	case $MMTTT :
		$vars['faculty'] = elgg_echo('uit:faculty:net');
		break;
	case $HTTT :
		$vars['faculty'] = elgg_echo('uit:faculty:is');
		break;
	default :
		break;
}

?>
<div>
	<label><?php echo elgg_echo('resume:personal:name'); ?></label><br />
    <?php echo elgg_view('input/text',array('name' => 'name', 'value' => $vars['name'])); ?>
</div>

<div style="width: 50%;">
	<label><?php echo elgg_echo('resume:personal:dob'); ?></label><br />
    <?php echo $dob;?>
</div>

<div style="width: 40%;">
	<label><?php echo elgg_echo('resume:personal:gender'); ?></label><br />
    <?php echo $gender; ?>
</div>
<div>
	<label><?php echo elgg_echo('resume:personal:email'); ?></label><br />
    <?php echo elgg_view('input/email',array('name' => 'email', 'value' => $vars['email'])); ?>
</div>
<div>
	<label><?php echo elgg_echo('resume:personal:phone'); ?></label><br />
    <?php echo elgg_view('input/text',array('name' => 'phone', 'value' => $vars['phone'])); ?>
</div>
<div>
	<label><?php echo elgg_echo('resume:personal:address'); ?></label><br />
    <?php echo elgg_view('input/text',array('name' => 'address', 'value' => $vars['address'])); ?>
</div>
<div>
	<label><?php echo elgg_echo('resume:personal:faculty'); ?></label><br />
	<input type="text" value="<?php echo $vars['faculty']?>" name="faculty" class="elgg-input-text" readonly="true;">
</div>
<div>
	<label><?php echo elgg_echo('resume:personal:moredetail'); ?></label><br />
    <?php echo elgg_view('input/longtext',array('name' => 'moredetail', 'value' => $vars['moredetail'])); ?>
</div>

<div>
	<?php echo $guid;?>
    <?php echo elgg_view('input/submit', array('value' => elgg_echo('save'))); ?>
</div>